<?php
$data = array(
    'T' => array(
        array(
            'title' => 'T title',
            'url' => 'a' 
        ) 
    ),
    'A' => array(
        array(
            'title' => 'A title 1',
            'url' => 'aaa' 
        ),
        array(
            'title' => 'A title 2',
            'url' => 'bbbb' 
        ) 
    ),
    'C' => array(
        array(
            'title' => 'C title',
            'url' => 'xxx' 
        ) 
    ),
    'B' => array(
        array(
            'title' => 'B title',
            'url' => 'ff' 
        ) 
    ) 
);


ksort($data);
?>


<?php foreach ($data as $k => $v) {?>
<h1><?php echo $k?></h1>
<ul>
    <?php foreach ($v as $song) {?>
        <li><?php echo $song['title']?></li>
    <?php }?>
</ul>
<?php }?>